import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import Pinia from "./stores";
import Router from "./router";
// 引入 vant 组件
import { Button, Toast, Circle, NavBar, Tabbar, TabbarItem } from "vant";
import "vant/lib/index.css";

// vant 组件列表
const vantComponents = [Button, Toast, Circle, NavBar, Tabbar, TabbarItem];

// 遍历使用 vant 组件的函数
const forUseVantComponent = () => {
  vantComponents.forEach((item) => {
    app.use(item);
  });
};

const app = createApp(App);

app.use(Pinia);
app.use(Router);
// 调用遍历使用 vant 组件的函数
forUseVantComponent();
app.mount("#app");
